﻿using AutoMapper;
using CCS.BLL.DTO;
using CCS.DAL.Model;

namespace CCS.BLL.Mapping
{
    public class ItemSizeProfile : Profile
    {
        protected override void Configure()
        {
            Mapper.CreateMap<ItemSize, ItemSizeDto>()
                .ForMember(x=>x.Id, y => y.MapFrom(z=>z.Id))
                .ForMember(x => x.ProductName, y => y.MapFrom(z => z.Item.Name))
                .ForMember(x => x.SizeName, y => y.MapFrom(z => z.Size.Name));
            // Mapper.CreateMap<ItemSizeDto, ItemSize>();
        }
    }
}